import 'package:json_annotation/json_annotation.dart'; 
  
part 'three_data.g.dart';


List<ThreeData> getThreeDataList(List<dynamic> list){
    List<ThreeData> result = [];
    list.forEach((item){
      result.add(ThreeData.fromJson(item));
    });
    return result;
  }
@JsonSerializable()
  class ThreeData extends Object {

  @JsonKey(name: 'children')
  List<ThreeData> children;

  @JsonKey(name: 'courseId')
  int courseId;

  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'order')
  int order;

  @JsonKey(name: 'parentChapterId')
  int parentChapterId;

  @JsonKey(name: 'userControlSetTop')
  bool userControlSetTop;

  @JsonKey(name: 'visible')
  int visible;

  ThreeData(this.children,this.courseId,this.id,this.name,this.order,this.parentChapterId,this.userControlSetTop,this.visible,);

  factory ThreeData.fromJson(Map<String, dynamic> srcJson) => _$ThreeDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ThreeDataToJson(this);
}

  
